//
//  NSString+SMCategory.h
//  DiDi
//
//  Created by huangtie on 2017/3/19.
//  Copyright © 2017年 Sinmore. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (SMCategory)

/** 解析Unicode编码的汉字 **/
+ (NSString *)replaceUnicode:(NSString *)string;


/** 获取当前时间戳 **/
+ (NSString *)currentTimestamp;
/** 根据时间戳获取 X年X月 星期X **/
+ (NSString *)yearMonthWeekFromTimestamp:(NSString *)timestamp;
/** 根据时间戳获取 X:X **/
+ (NSString *)hourMinuteFromTimestamp:(NSString *)timestamp;
/** 根据时间戳获取 [year/month/day/hour/minute/second/week] **/
+ (NSDictionary *)timeGatherFromTimestamp:(NSString *)timestamp;
/** 时间戳转换为可读时间 **/
+ (NSString *)timeStampToString:(NSString *)timestamp dateFormat:(NSString *)dateFormat;
/** 可读时间转换为时间戳 **/
+ (NSString *)stringToTimeStamp:(NSString *)string dateFormat:(NSString *)dateFormat;
/** 可读时间转换成另外一种可读时间 **/
+ (NSString *)timeStringToTimeString:(NSString *)timeString fromFormat:(NSString *)fromFormat toFormat:(NSString *)toFormat;
/** 判断是否是周末 **/
+ (BOOL)isWeekend:(NSString *)timestamp;
/** 时间戳转换为星期几 **/
+ (NSString *)weekCharFromTimestamp:(NSString *)timestamp;
/** 今天第一秒的时间戳 **/
+ (double)todayFirstSecondTimeStamp;
/** xxxx-xx-xx xx:xx:xx 转成 今天xx:xx / 昨天xx:xx **/
+ (NSString *)messageTimeWithTimeString:(NSString *)timeString;

/** 距离的显示 (米) **/
+ (NSString *)transformDistance:(NSInteger)distance;
@end
